import { constantRoutes } from '@/router/index'
export const state = {
  // 存储的是不需要权限也能访问的页面
  menuList: [...constantRoutes]
}
export const mutations = {
  updateMenu(state, menu) {
    // 将筛选出来的页面通过展开运算符加到 menuList 中
    state.menuList = [...constantRoutes, ...menu]
  }
}
export default {
  namespaced: true,
  state,
  mutations
}
